import './storage.dart';

class UserService {
  // 获取用户信息
  static Future getUserInfo() async {
    var userInfoMap = await Storage.getData("userInfo");

    return userInfoMap;
  }

  // 保存用户信息
  static Future<bool> getUserLoginState() async {
    var userInfo = await getUserInfo();
    return userInfo != null;
  }

  // 清除userInfo
  static clearUserInfo() async {
    Storage.removeData("userInfo");
  }
}
